import type { Meta, StoryObj } from "@storybook/react";
import Example from "./example";
import { RegName } from "../pattern";
// import Example from "./example";

const meta: Meta = {
  title: "libs/pattern",
  // component: Example
  component: Example,
};

export default meta;

type Story = StoryObj<typeof Example>;

export const EMAIL: Story = {
  args: {
    args: [RegName.EMAIL],
    validateStr: "abc@apusic.com",
  },
};

export const TEL: Story = {
  args: {
    args: [RegName.TEL],
    validateStr: "15945672138",
  },
};

export const IP: Story = {
  args: {
    args: [RegName.IP],
    validateStr: "172.24.5.115",
  },
};

export const PWD: Story = {
  args: {
    args: [RegName.PWD],
    validateStr: "hello",
  },
};

export const NAME: Story = {
  args: {
    args: [RegName.NAME],
    validateStr: "user",
  },
};

export const TITLE: Story = {
  args: {
    args: [RegName.TITLE],
    validateStr: "title",
  },
};

export const PORTNEW: Story = {
  args: {
    args: [RegName.PORTNEW],
    validateStr: "810086",
  },
};

export const HOST: Story = {
  args: {
    args: [RegName.HOST],
    validateStr: "mass.acp.dev",
  },
};
